﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Mvc.Routing;

namespace WebApi
{
    /// <summary>
    /// 全局路由前缀配置
    /// </summary>
    public class HostingEnvironment
    {
        private readonly IHostingEnvironment _hostingEnvironment;
        /// <summary>
        /// HostingEnvironment
        /// </summary>
        /// <param name="hostingEnvironment"></param>
        public HostingEnvironment(IHostingEnvironment hostingEnvironment)
        {
            _hostingEnvironment = hostingEnvironment;
        }
        #region  WebRootPath
        /// <summary>
        /// 定制的功能,功能之间用"|"分隔开
        /// </summary>
        public string WebRootPath
        {
            get
            {
                return _hostingEnvironment.WebRootPath;
            }
        }
        #endregion

        #region  ContentRootPath
        /// <summary>
        /// 定制的功能,功能之间用"|"分隔开
        /// </summary>
        public string ContentRootPath
        {
            get
            {
                return _hostingEnvironment.ContentRootPath;
            }
        }
        #endregion
    }
}
